package com.zhu.service.smtp;

import com.zhu.service.base.config.MailConstance;
import org.springframework.amqp.core.Queue;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;


@SpringBootApplication(exclude = DataSourceAutoConfiguration.class)
@ComponentScan({"com.zhu"})
@EnableDiscoveryClient
@EnableFeignClients
public class SMTPApplication {
    public static void main(String[] args) {
        SpringApplication.run(SMTPApplication.class,args);
    }
    @Bean
    public Queue queue() {
        return new Queue(MailConstance.MAIL_QUEUE_NAME);
    }
}
